/**
 * @作者 伟子涵
 * @微信公号 搬砖暗夜码农
 * @开源项目 $ https://gitee.com/zhouwei5208888
 * @我的博客 $ http://itzhouwei.com
 * @创建时间 2023/12/15  9:58
 */
package com.itzhouwei.commerce.controller;

import com.itzhouwei.commerce.service.ZwQueryGrantTypeService;
import com.itzhouwei.commerce.vo.ZwQueryGrantTypeVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description:
 * @author：zw，微信：yingshengzw
 * @date: 2023/12/15  9:58 
 * @Copyright： 公众号：搬砖暗夜码农 | 博客：https://itzhouwei.com - 沉淀、分享、成长，让自己和他人都能有所收获！
 */
@RestController
public class GrantTypeController {


    private final ZwQueryGrantTypeService queryGrantTypeService;

    public GrantTypeController(ZwQueryGrantTypeService queryGrantTypeService) {
        this.queryGrantTypeService = queryGrantTypeService;
    }

    @PostMapping("/grantType")
    public ZwQueryGrantTypeVo test(String resourceName){
        String result = queryGrantTypeService.getResult(resourceName);
        ZwQueryGrantTypeVo zwQueryGrantTypeVo = new ZwQueryGrantTypeVo();
        zwQueryGrantTypeVo.setResourceName(result);
        return zwQueryGrantTypeVo;
    }
}
